1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| [hadoop@hadoop ~]$ df -h 文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root 47G 15G 33G 31% / devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 1.9G 12M 1.9G 1% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/sda1 1014M 189M 826M 19% /boot tmpfs 378M 0 378M 0% /run/user/1000 tmpfs 378M 0 378M 0% /run/user/0
[hadoop@hadoop ~]$ free -m total used free shared buff/cache available Mem: 3771 435 2966 11 368 2996 Swap: 2047 0 2047
参考博客 http://blog.itpub.net/30089851/viewspace-2131678/
[hadoop@hadoop ~]$ top top - 11:37:38 up 9:22, 1 user, load average: 0.00, 0.01, 0.05 Tasks: 118 total, 2 running, 116 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.2 us, 0.0 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 3861508 total, 3037300 free, 446708 used, 377500 buff/cache KiB Swap: 2097148 total, 2097148 free, 0 used. 3067784 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 193572 6636 4136 S 0.0 0.2 0:06.68 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:00.32 ksoftirqd/0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 7 root rt 0 0 0 0 S 0.0 0.0 0:00.07 migration/0 8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh 9 root 20 0 0 0 0 S 0.0 0.0 0:02.16 rcu_sched 10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain 11 root rt 0 0 0 0 S 0.0 0.0 0:00.26 watchdog/0 12 root rt 0 0 0 0 S 0.0 0.0 0:00.25 watchdog/1
一个系统卡不卡主要看 load average: 0.00, 0.01, 0.05 1min 5min 15min 经验值 不要超过10 否则认为此物理服务器(同等配置云服务器比物理要下降20%的性能) IDC机房
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 177 root 20 0 0 0 0 S 50% 70% 0:34.13 xxxx 去看看xxx这个进程是做什么 来判断为什么消耗那么多的cpu和内存 1777 root 20 0 0 0 0 S 3908% 80% 0:34.13 hbase regionserver 原因有可能是进程夯住/有问题/代码级别问题/硬件级别-内存条坏了
|